<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
<html><head>
<title>drs</title>
</head><body>
<p>[<a href="mxdoc.htm">mainpage</a>]
[<a href="tags.htm">tags</a>]<br>
<h1><a name="drs">module: drs</a></h1><p><b>Dirty rectangle updating system</b><p>
This module implements a dirty-rectangle updating system.  
(<a href="../include/detk/drs.h">../include/detk/drs.h</a>)<p>Part of the <a href="detk.htm">detk</a> library.<ul><li>
<a name="typedef void (*MX_FLUSH_FUNC) (MX_RECT* rect);"><code>typedef void (*MX_FLUSH_FUNC) (MX_RECT* rect);</code></a>
<p>
<p><b>Flush callback function for dirty rectangle updating</b><p>
This typedef defines a user defined callback function where dirty
portions of the screen are determined.  Inside the callback the user should
place code to actually update the screen area.  The updating rectangle can be
modified by the callback to indicate what portions of the screen are actually
updated.   
(<a href="../include/detk/drs.h">../include/detk/drs.h</a>)<p></li>
<li>
<a name="void mx_drs_area(int w, int h)"><code>void mx_drs_area(int w, int h)</code></a>
<p>
<p><b>Initialize dirty-rectangle system</b><p>
This function initializes the dirty-rectangle updating system for a
screen of the given dimensions.  
(<a href="../include/detk/drs.c">../include/detk/drs.c</a>)<p></li>
<li>
<a name="unsigned mx_drs_dirtychanged(void)"><code>unsigned mx_drs_dirtychanged(void)</code></a>
<p>
<p><b>Return if parts of the screen need updating</b><p>
This function returns zero if there are no dirty areas of the screen.
If the function return false then a following call to mx_drs_update() will
not call the flush callback.  This is useful to determine if a call to
mx_drs_update() could (potentially) update the screen.  It is not guaranteed
that if this function returns true that mx_drs_update() will in fact call
the fluch callback function.  
(<a href="../include/detk/drs.c">../include/detk/drs.c</a>)<p></li>
<li>
<a name="unsigned mx_drs_update(MX_FLUSH_FUNC dflush)"><code>unsigned mx_drs_update(MX_FLUSH_FUNC dflush)</code></a>
<p>
<p><b>Call the flush function with the parts of the screen needing updating</b><p>
This function calls a user defined callback function with the areas
of the screen marked as dirty by the mx_drs_dirty() function.  
(<a href="../include/detk/drs.c">../include/detk/drs.c</a>)

<p>This functions return zero if no portion of the screen requires
        updating.  
(<a href="../include/detk/drs.c">../include/detk/drs.c</a>)

<p>The updated areas (after possible modification in the callback) are
    guaranteed to bo non-overlapping.  
(<a href="../include/detk/drs.c">../include/detk/drs.c</a>)

<p>The callback function may modify the area to indicate the area
            actually updated.  
(<a href="../include/detk/drs.c">../include/detk/drs.c</a>)

<p>After this function returns the entire dirty area of the screen will have
    been updated though the callback and the entire screen will be marked as
    clean.  
(<a href="../include/detk/drs.c">../include/detk/drs.c</a>)<p></li>
<li>
<a name="void mx_drs_dirty(const MX_RECT* rrect, unsigned mark)"><code>void mx_drs_dirty(const MX_RECT* rrect, unsigned mark)</code></a>
<p>
<p><b>Mark a portion of the screen as needing updating</b><p>
This function marks a portion of the screen as dirty or clean.  
(<a href="../include/detk/drs.c">../include/detk/drs.c</a>)<p></li>
</ul><p>Generated by <a href="http://www.deleveld.dds.nl/mxdoc/index.htm">MXDOC</a> 2.2 on Sun Feb  4 15:16:27 2007


</body></html>
